import { createApp } from 'vue'
import App from './App.vue'
import store from './store'

import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'

import 'virtual:windi.css'
import './assets/common.scss'

import 'nprogress/nprogress.css'

import {router} from './router'
import plugins from './plugins'

import './permission'

// 自定义组件
import IconComponent from '@/components/Icon/index.vue'
import DialogForm from '@/components/DialogForm/index.vue'
import IconSelect from '@/components/IconSelect/index.vue'
import Pagination from '@/components/Pagination/index.vue'
import DictTag from '@/components/DictTag/index.vue'
import Editor from '@/components/Editor/index.vue'
import Files from '@/components/Material/index.vue'
import OverflowTooltip from '@/components/OverflowTooltip/index.vue'
import ImagePreview from '@/components/ImagePreview/index.vue'
import VideoPreview from '@/components/VideoPreview/index.vue'
import Upload from '@/components/Upload/index.vue'
import DelWrap from '@/components/DelWrap/index.vue'
import FilePicker from '@/components/Material/picker.vue'
import FilePickerForm from "@/components/Material/components/FilePickerForm.vue";
import IconList from "@/components/IconList/index.vue";
import directive from "@/directive";

const app = createApp(App)

app.component('icon', IconComponent)
app.component('dialog-form', DialogForm)
app.component('icon-select', IconSelect)
app.component('pagination', Pagination)
app.component('dict-tag', DictTag)
app.component('editor', Editor)
app.component('files', Files)
app.component('file-picker', FilePicker)
app.component('file-picker-form', FilePickerForm)
app.component('overflow-tooltip', OverflowTooltip)
app.component('image-preview', ImagePreview)
app.component('video-preview', VideoPreview)
app.component('upload', Upload)
app.component('del-wrap', DelWrap)
app.component('icon-list', IconList)

// 注册指令
directive(app)

app.use(Antd)
app.use(store)
app.use(router)
app.use(plugins)
app.mount('#app')
